Optimal. Leaf size=107 \[ \frac {7 \sin (c+d x)}{9 a^2 d}-\frac {7 \sin ^3(c+d x)}{9 a^2 d}+\frac {7 \sin ^5(c+d x)}{15 a^2 d}-\frac {\sin ^7(c+d x)}{9 a^2 d}+\frac {2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3581, 2713}
\begin {gather*} -\frac {\sin ^7(c+d x)}{9 a^2 d}+\frac {7 \sin ^5(c+d x)}{15 a^2 d}-\frac {7 \sin ^3(c+d x)}{9 a^2 d}+\frac {7 \sin (c+d x)}{9 a^2 d}+\frac {2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2713
Rule 3581
Rubi steps
\begin {align*} \int \frac {\cos ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac {2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac {7 \int \cos ^7(c+d x) \, dx}{9 a^2}\\ &=\frac {2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}-\frac {7 \text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{9 a^2 d}\\ &=\frac {7 \sin (c+d x)}{9 a^2 d}-\frac {7 \sin ^3(c+d x)}{9 a^2 d}+\frac {7 \sin ^5(c+d x)}{15 a^2 d}-\frac {\sin ^7(c+d x)}{9 a^2 d}+\frac {2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.53, size = 117, normalized size = 1.09 \begin {gather*} \frac {i \sec ^2(c+d x) (-1050 \cos (c+d x)+378 \cos (3 (c+d x))+30 \cos (5 (c+d x))+2 \cos (7 (c+d x))-525 i \sin (c+d x)+567 i \sin (3 (c+d x))+75 i \sin (5 (c+d x))+7 i \sin (7 (c+d x)))}{2880 a^2 d (-i+\tan (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 239 vs. \(2 (95 ) = 190\).
time = 0.27, size = 240, normalized size = 2.24
method | result | size |
risch | \(\frac {i {\mathrm e}^{-7 i \left (d x +c \right )}}{128 a^{2} d}+\frac {i {\mathrm e}^{-9 i \left (d x +c \right )}}{1152 a^{2} d}+\frac {7 i \cos \left (d x +c \right )}{64 a^{2} d}+\frac {7 \sin \left (d x +c \right )}{16 a^{2} d}+\frac {i \cos \left (5 d x +5 c \right )}{32 a^{2} d}+\frac {11 \sin \left (5 d x +5 c \right )}{320 a^{2} d}+\frac {7 i \cos \left (3 d x +3 c \right )}{96 a^{2} d}+\frac {7 \sin \left (3 d x +3 c \right )}{64 a^{2} d}\) | \(137\) |
derivativedivides | \(\frac {\frac {i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}-\frac {9 i}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {1}{20 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {13}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {29}{64 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {51 i}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {49 i}{6 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {35 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {4}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {5}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {49}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {49}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {99}{64 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{2} d}\) | \(240\) |
default | \(\frac {\frac {i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{4}}-\frac {9 i}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {1}{20 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{5}}-\frac {13}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {29}{64 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}-\frac {2 i}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{8}}+\frac {51 i}{16 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {49 i}{6 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}-\frac {35 i}{4 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {4}{9 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{9}}-\frac {5}{\left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}+\frac {49}{5 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {49}{8 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+\frac {99}{64 \left (-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}}{a^{2} d}\) | \(240\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 96, normalized size = 0.90 \begin {gather*} \frac {{\left (-9 i \, e^{\left (14 i \, d x + 14 i \, c\right )} - 105 i \, e^{\left (12 i \, d x + 12 i \, c\right )} - 945 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 1575 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 525 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 189 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 45 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{5760 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 299 vs. \(2 (94) = 188\).
time = 0.41, size = 299, normalized size = 2.79 \begin {gather*} \begin {cases} \frac {\left (- 227994731135631360 i a^{14} d^{7} e^{30 i c} e^{5 i d x} - 2659938529915699200 i a^{14} d^{7} e^{28 i c} e^{3 i d x} - 23939446769241292800 i a^{14} d^{7} e^{26 i c} e^{i d x} + 39899077948735488000 i a^{14} d^{7} e^{24 i c} e^{- i d x} + 13299692649578496000 i a^{14} d^{7} e^{22 i c} e^{- 3 i d x} + 4787889353848258560 i a^{14} d^{7} e^{20 i c} e^{- 5 i d x} + 1139973655678156800 i a^{14} d^{7} e^{18 i c} e^{- 7 i d x} + 126663739519795200 i a^{14} d^{7} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{145916627926804070400 a^{16} d^{8}} & \text {for}\: a^{16} d^{8} e^{25 i c} \neq 0 \\\frac {x \left (e^{14 i c} + 7 e^{12 i c} + 21 e^{10 i c} + 35 e^{8 i c} + 35 e^{6 i c} + 21 e^{4 i c} + 7 e^{2 i c} + 1\right ) e^{- 9 i c}}{128 a^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 197 vs. \(2 (93) = 186\).
time = 0.78, size = 197, normalized size = 1.84 \begin {gather*} \frac {\frac {3 \, {\left (435 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 1470 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2060 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1330 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 353\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{5}} + \frac {4455 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 26460 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 78120 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 137340 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 157374 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 118356 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 57744 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 16596 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2339}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{9}}}{2880 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.65, size = 216, normalized size = 2.02 \begin {gather*} \frac {\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {191\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16}-\frac {1289\,\sin \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )}{64}+\frac {649\,\sin \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )}{64}-\frac {41\,\sin \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )}{32}+\frac {41\,\sin \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )}{32}-\frac {7\,\sin \left (\frac {11\,c}{2}+\frac {11\,d\,x}{2}\right )}{64}+\frac {7\,\sin \left (\frac {13\,c}{2}+\frac {13\,d\,x}{2}\right )}{64}+\frac {\cos \left (\frac {3\,c}{2}+\frac {3\,d\,x}{2}\right )\,525{}\mathrm {i}}{32}-\frac {\cos \left (\frac {5\,c}{2}+\frac {5\,d\,x}{2}\right )\,205{}\mathrm {i}}{32}+\frac {\cos \left (\frac {7\,c}{2}+\frac {7\,d\,x}{2}\right )\,1{}\mathrm {i}}{2}-\frac {\cos \left (\frac {9\,c}{2}+\frac {9\,d\,x}{2}\right )\,1{}\mathrm {i}}{2}+\frac {\cos \left (\frac {11\,c}{2}+\frac {11\,d\,x}{2}\right )\,1{}\mathrm {i}}{32}-\frac {\cos \left (\frac {13\,c}{2}+\frac {13\,d\,x}{2}\right )\,1{}\mathrm {i}}{32}\right )\,2{}\mathrm {i}}{45\,a^2\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^9\,{\left (\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________